-
Notifications
You must be signed in to change notification settings - Fork 0
Setup email verification #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements email verification functionality to address issue #559. The implementation includes email verification tokens, mailer functionality, and GraphQL mutations for verifying email addresses.
Key changes:
- Added email verification services for sending and verifying email tokens
- Implemented email verification workflow integrated with user registration and update processes
- Created GraphQL mutation and corresponding tests for email verification
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
app/models/user.rb | Added token generation for email verification with 15-minute expiry |
app/services/users/email_verification_service.rb | Service to verify email tokens and update user verification status |
app/services/users/email_verification_send_service.rb | Service to send verification emails to users |
app/mailers/user_mailer.rb | Mailer class for sending email verification messages |
app/graphql/mutations/users/email_verification.rb | GraphQL mutation for email verification |
db/migrate/20250919201730_add_email_verified_at_to_user.rb | Database migration adding email verification timestamp |
spec/support/shared_examples/sends_email.rb | Fixed typo in shared example variable name |
Multiple test files | Added comprehensive test coverage for email verification functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2097192623 Status: Passed Job summariesrspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/11701496176/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/11701496173/artifacts/tmp/coverage/index.html rubocop644 files inspected, no offenses detected |
app/policies/namespace_policy.rb
Outdated
customizable_permission :verify_email | ||
customizable_permission :send_verification_email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These abilities don't make sense at the namespace level. Those are purely user level actions
subject(:service_response) { described_class.new(create_authentication(current_user), organization, params).execute } | ||
|
||
shared_examples 'does not update' do | ||
shared_examples 'user doesnt verify' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename doesn't make sense
subject(:service_response) { described_class.new(create_authentication(current_user), runtime, params).execute } | ||
|
||
shared_examples 'does not update' do | ||
shared_examples 'user doesnt verify' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, shouldn't be renamed
close #559